<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #app {
            width: 100%;
            height: 667px;
            /* background-color: pink; */
            overflow: hidden;
        }

        h1 {
            margin-top: 40px;
        }

        input {
            width: 80%;
            height: 50px;
            margin-top: 10px;
            margin-left: 30px;
            border: 0;
            border-bottom: 1px solid #ccc;
            outline: none;
        }

        button {
            width: 80%;
            height: 40px;
            background-color: #ccc;
            color: grey;
            margin-left: 30px;
            border-radius: 30px;
            border: 0;
            margin-top: 60px;
            margin-bottom: 10px;
        }

        .one {
            margin-left: 35px;
            color: rgb(7, 215, 243);
        }

        .two {
            margin-left: 140px;
            color: rgb(7, 215, 243);
        }

        .checkbox {
            width: 20px;
            position: absolute;
            top: 500px;
            left: 15px;
        }

        .yi {
            font-size: 14px;
            margin-left: 10px;
            position: absolute;
            top: 525px;
            left: 60px;
        }

        .er {
            font-size: 14px;
            color: rgb(7, 215, 243);
            position: absolute;
            top: 525px;
            left: 160px;
        }
    </style>
</head>

<body>
    <div id="app">
        <h1>密码登录</h1>
        <input type="text" placeholder="手机/用户名" v-model="form.name">
        <input type="password" placeholder="密码" v-model="form.pass">
        <button @click="login">登录</button>
        <span class="one">手机号登录</span><span class="two">忘记密码</span>
        <input class="checkbox" type="checkbox"><span class="yi">已阅读并同意</span><span class="er">《用户服务协议》、《隐私协议》</span>
    </div>
    <script src="./vue-2.5.21.js"></script>
</body>

</html>
<script>
    var v = new Vue({
        el: '#app',
        data: {
            form: { name: 'zhaojiaxue', pass: '1234' }
        },
        methods: {
            login() {
                console.log(this.form); //获取data中的数据
            }
        }
    })
</script>